import React from 'react'
import ReactDOM from 'react-dom'


var Contact1 = React.createClass({
    getDefaultProps:function(){
        return{
            name: 'aaaa'
        }
    },
    render(){
        return(
            <div>Contact1 {this.props.name}</div>
        )
    }
})

class Contact2 extends React.Component{
    constructor(props){
        super(props)
    }
    render(){
        return(
            <div>Contact2 {this.props.name}</div>
        )
    }
}
Contact2.defaultProps = {
    name: 'bbbb'
}

ReactDOM.render(
    <Contact1/>,
    document.getElementById('app')
)
ReactDOM.render(
    <Contact2/>,
    document.getElementById('app2')
)